﻿using System;

namespace TestUp.Models.ShortEntities
{
    public class ShortPendingTest
    {
        public int PendingTestId { get; set; }
        public DateTime ExpirationDate { get; set; }
        public int GroupId { get; set; }
        public int TestId { get; set; }

        public virtual ShortGroup Group { get; set; }
        public virtual ShortTest Test { get; set; }

        public PendingTest ConvertToEntity()
        {
            var pendingTest = EntitiesConverter.ToEntity<PendingTest, ShortPendingTest>(this);
            pendingTest.Group = Group.ConvertToEntity();
            pendingTest.Test = Test.ConvertToEntity();

            return pendingTest;
        }
    }
}